<!doctype html>
<html lang="">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite App</title>
    <style></style>
  </head>
  <body>
    <div id="app" @click="message+='s'">
      <div v-html="content"></div>
      {{message}}
      <div>
        <button @click="age++">按钮</button></button>
        {{age}}岁了
      </div>
      <div>
        <a href="http://www.baidu.com" @click="add($event, 3)">+3岁</a>
      </div>
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: '#app',
        data: {
          message: 'Hello Vue!',
          content: '<div>123</div>',
          age: 0
        },
        methods:{
          add(e, num){
            e.preventDefault()
            this.age += num
          }
        }
      })
    </script>
  </body>
</html>
